package com.tct.worktimeboard.service.impl;

import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSONObject;
import com.tct.worktimeboard.service.CreateGroupService;
import com.tct.worktimeboard.service.IUserInfoService;
import com.tct.worktimeboard.service.IWorkGroupService;
import com.tct.worktimeboard.service.impl.listener.PowerListener;
import com.tct.worktimeboard.util.JsonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @author Huhailong
 * @Description
 * @Date 2021/4/24.
 */
@Service
public class CreateGroupServiceImpl implements CreateGroupService {

    @Autowired
    IWorkGroupService workGroupService;
    /**
     * 给用户赋予工时审批权限
     * @return 返回状态
     */
    @Override
    public JSONObject addPower() {
        EasyExcel.read("C:\\temp\\yanfa3.xlsx",new PowerListener(workGroupService)).sheet().doRead();
        return JsonUtil.toJsonData();
    }
}
